home *** CD-ROM | disk | FTP | other *** search
Text File | 2001-09-23 | 1.6 KB | 44 lines | [TEXT/ToyS] |
- -- Either set the correct pathname below or leave it as it is,
- -- in which case the script will ask you for a folder name.
- -- (Courtesy of Eric Grant)
- property projectFolder : ""
-
- if projectFolder is "" then set projectFolder to (choose folder with prompt "Select the project folder:")
- -- the alias is saved as a property and will be there next time
-
- tell application "Virtual Composer"
- activate
- -- Set your repeats as appropriate
- set repeats to false
- -- Deactivate Animation
- set animation to false
- -- Set included subfolders as appropriate
- --(for the E-motion Suite, you should set it to true.
- --For the Lute Suite and the Goldberg Variations leave it as is
- set subfolders to false
- -- set pathname!
- set folderString to projectFolder as string
- -- note that we give the script a long timeout value,
- -- so that all Documents can be saved without AppleScript timout errors
- with timeout of 240 seconds
- repeat with aFile in list folder projectFolder
- set theFile to (a reference to file (folderString & aFile))
- set theTargetFile to (a reference to file (folderString & aFile & ".aif"))
- -- export'theFile'
- export theFile in theTargetFile as "aiff"
- end repeat
- end timeout
-
- -- now play whatever was produced!
- set temp to display dialog "Do you want to listen to the AIFFs in the project folder now?" buttons {"Yes", "No"} default button 1
-
- if button returned of temp = "Yes" then
- repeat with aFile in list folder projectFolder
- if ((aFile as text) contains ".aif") then
- set theFile to (a reference to file (folderString & aFile))
- play theFile
- end if
- end repeat
- end if
- end tell
-